import echarts from "echarts/lib/echarts";
import 'echarts/lib/component/title'

const createBar = function (idName) {
    if (!document.getElementById(idName)) {
        return false;
    }
    let myChart = echarts.init(document.getElementById(idName));//响应式
    window.onresize = myChart.resize;
    window.addEventListener('resize', function () {
        myChart.resize()
    });
    return myChart
};


export default createBar